package continuum.db.dao;

import java.io.Serializable;
import java.util.List;

import continuum.db.dao.util.QueryParameter;
import continuum.db.exceptions.DaoException;

public interface Dao<T, PK extends Serializable> {

	public PK insert(T newInstance) throws DaoException;

	public void update(T transientObject) throws DaoException;

	public void upsert(T transientObject) throws DaoException;

	public void delete(T persistentObject) throws DaoException;

	public T select(PK id) throws DaoException;

	public List<T> selectAll() throws DaoException;

	public List<T> selectAllByField(QueryParameter... parameter)
			throws DaoException;

}
